package com.example.script.admin.model.dto;

import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

/**
 * @author CuiZhaolong
 * @DATE 2022/2/28
 */

public class ChooseScriptDto {
    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "选择剧本的玩家id")
    private Long userId;
    @ApiModelProperty(value = "选择的剧本id")
    private Long scriptId;
    @ApiModelProperty(value = "邀请码")
    private String InvitationCode;
    @ApiModelProperty(value = "预约状态码")
    private Long stateCode;
    @ApiModelProperty(value = "创建时间")
    @Temporal(TemporalType.TIMESTAMP)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @CreatedDate
    private Date creationTime;


    public ChooseScriptDto(Long id, Long userId, Long scriptId, String invitationCode, Long stateCode, Date creationTime) {
        this.id = id;
        this.userId = userId;
        this.scriptId = scriptId;
        InvitationCode = invitationCode;
        this.stateCode = stateCode;
        this.creationTime = creationTime;
    }

    public ChooseScriptDto() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getScriptId() {
        return scriptId;
    }

    public void setScriptId(Long scriptId) {
        this.scriptId = scriptId;
    }

    public String getInvitationCode() {
        return InvitationCode;
    }

    public void setInvitationCode(String invitationCode) {
        InvitationCode = invitationCode;
    }

    public Long getStateCode() {
        return stateCode;
    }

    public void setStateCode(Long stateCode) {
        this.stateCode = stateCode;
    }

    public Date getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(Date creationTime) {
        this.creationTime = creationTime;
    }

    @Override
    public String toString() {
        return "ChooseScriptDto{" +
                "id=" + id +
                ", userId=" + userId +
                ", scriptId=" + scriptId +
                ", InvitationCode='" + InvitationCode + '\'' +
                ", stateCode=" + stateCode +
                ", creationTime=" + creationTime +
                '}';
    }
}
